<%@ page contentType="text/html; charset=UTF-8"%>
<%@ taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
<%@ taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<html>
<script type="text/javascript" src="http://api.map.baidu.com/api?v=1.3"></script>
<head>
<title>Welcome to the IMDroid</title>
</head>
<body>
	<div style="width: 800px; height: 540px; border: 1px solid gray"
		id="container"></div>
</body>
<script>
	var nickname = '<c:out value="${sessionScope.imdroidUser.nickname}" />';
	var lat = <c:out value="${sessionScope.imdroidUser.current_lat}" />;
	var lon = <c:out value="${sessionScope.imdroidUser.current_lon}" />;
	var map = new BMap.Map("container");

	var point = new BMap.Point(lon, lat);
	map.centerAndZoom(point, 15);
	map.addControl(new BMap.NavigationControl());
	map.enableScrollWheelZoom();
	var marker = new BMap.Marker(point);
	map.addOverlay(marker);
</script>
</html>
